import request from '@/utils/request'

// 查询用印类型列表
export function listTrainType(query) {
  return request({
    url: '/train/trainType/list',
    method: 'get',
    params: query
  })
}

// 查询用印类型详细
export function getTrainType(trainTypeId) {
  return request({
    url: '/train/trainType/' + trainTypeId,
    method: 'get'
  })
}

// 新增用印类型
export function addTrainType(data) {
  return request({
    url: '/train/trainType',
    method: 'post',
    data: data
  })
}

// 修改用印类型
export function updateTrainType(data) {
  return request({
    url: '/train/trainType',
    method: 'put',
    data: data
  })
}

// 删除用印类型
export function delTrainType(trainTypeId) {
  return request({
    url: '/train/trainType/' + trainTypeId,
    method: 'delete'
  })
}

// 查询最低培训时间
export function selectMinTrainTime() {
  return request({
    url: '/train/trainType/selectMinTrainTime',
    method: 'get'
  })
}

// 新增用印类型
export function setMinTrainTime(data) {
  return request({
    url: '/train/trainType/setMinTrainTime',
    method: 'post',
    data: data
  })
}
